#include<iostream>
#include<string.h>
#include<stdlib.h>
/*
#define std::cout<<  std::cout<<"initial\n"<<
//*/

#define max(a,b) (a>b?a:b)


/**
    This segment of codes shows how to override the operator<<
    The key point is (const char* s),if you use string, it is a
    different method.
*/

///*
namespace std
{
ostream& operator<<(ostream& os,const char* s)
{
    string a1(s);
    string a2="<<initial\n";
    string a3="<<end initial\n";
    cout<<a2+a1+a3;
    //cout<<"initial\n";
    //cout<<"initial\n"<<s<<"end\n";
    return os;
}

}

//*/

#include<stdio.h>

struct Foo
{
    Foo()  { printf("before main()\n"); }
    ~Foo() { printf("after main()\n"); }
};

Foo smallFoo;

struct Coo
{
    Coo()  { std::cout<<"cout:before main"<<std::endl; }
    ~Coo() { std::cout<<"cout:after  main"<<std::endl; }
};

//Coo smallCoo;

int main()
{
    //std::string a="nihao";
    //std::cout<<a;
    std::cout<<"nihao\n";
    //std::cout<<max(1,2);
}
